package com.sugar.psych.assessment.module.business.enums;

import cn.hutool.core.util.ArrayUtil;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author Y.sugar
 * @since 2025/7/4 10:39
 */
@AllArgsConstructor
public enum PointRecordClsEnum {

    CLS1("兑换勋章", "1"),
    CLS2("睡眠时长达标", "2"),
    CLS3("日记", "3"),
    CLS4("压力自测", "4"),
    CLS5("回复树洞留言", "5"),
    CLS6("被赞", "6");

    @Getter
    private String label;

    @Getter
    private String value;

    public static PointRecordClsEnum find(String value){
        return ArrayUtil.firstMatch(s -> s.value.equals(value), values());
    }
}
